Add navtabs + Python to step-by-step description#211
Add navtabs + Python to step-by-step description#211
Conversation
|
Great idea! Comparing the two languages also helps a lot getting started with Python if you know C++, etc. And indeed, let's not add it for everything. I like the tabs implementation, it is visually very minimal. How does this work in the PDF export? |
|
Good question, let's test when generating the pdf the next time. |
|
Converting to PDF with Prince 15.1, only the first tab is shown: I would argue that we can solve this in two phases:
Since we are currently porting the documentation to preCICE v3, we should take this discussion into account. We could already update the Python part without having updated the C++ part, but target this PR to the |
|
Would definitely be a great addition! @MakisH we can do this together in a short time. |
|
I also like the general proposal, but please let's only merge this when version 3 is released. We already have all our hands full with keeping the documentation synchronized with the C++ API. |
|
@gdenayer this is how the "Coupled your code" pages could look like at some point. |
|
@MakisH It would be a great improvement and help new people to get into preCICE faster. |
|
I've started working on this issue and it was fairly easy to display both tabs (in the example above with a C++ and a Python tab) when the document is printed. However, the association between the tab header and the tab content is lost, so I came up with the following solution: I used two CSS counters to create small bubble-like badges. This implementation is pure CSS which is quite nice. |
|
This is a very creative solution, I like it! |
…ghlight association between tab headers and tab content when printed, issue #211
Yes, the name of the tab is at a different place in the code/tree, so to reference it you would need some Javascript that retrieves it. |
|
I understand that now we only need to add more content, right? I.e., to port every example of the "couple your code" section to Python. We still have some conflicts in |
|
I like the solution as well. |
|
Hello, |
…ghlight association between tab headers and tab content when printed, issue precice#211
…ghlight association between tab headers and tab content when printed, issue precice#211
…ghlight association between tab headers and tab content when printed, issue #211
90445d5 to
80aabc0
Compare
|
Closing this in favor of #523 |
…ghlight association between tab headers and tab content when printed, issue precice#211
…ghlight association between tab headers and tab content when printed, issue precice#211
* Extend step 2 with Python tab * styles navtabs for web and pdf/print targets, uses CSS counters to highlight association between tab headers and tab content when printed, issue #211 * Add Python code for `couple your code` section * Fix: vertical padding of nav tab content --------- Co-authored-by: Benjamin Uekermann <benjamin.uekermann@ipvs.uni-stuttgart.de> Co-authored-by: unknown <christopher.p.lorenz@gmail.com>


Apologies if we discussed this in the past already. I think it could be good to add Python code to the complete "couple your code" step-by-step descriptions. We could do this by using Navtabs for example.
Why?
is_coupling_ongoingLet's not (directly) do this for all bindings. This could easily become a lot of work. And let's not make this a must for each docs page with code. Let's merely start with the step-by-step guide and then see.
Current state is meant as a discussion starter and example. If we agree to do this, we might want to fine-tune things.